home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 4,401 to 4,500 / aol-file-protocol-4400-4401-to-4500.zip / AOLDLs / PDA-Newton Development / ND Newt Development Environm / newt-devenv-31.sit / using.txt < prev    next >
Text File  |  1995-08-11  |  17KB  |  381 lines

  1. using.txt
  2. 8/11/95
  3. Newt 3.1
  4. (c) 1995, S. Weyer, All Rights Reserved Worldwide.
  5. weyer@netaxs.com
  6.  
  7. - Getting Started
  8.   Where to Find Newt, Slurpee, NewtATut, NewtTurT,...
  9.   Exploring Newt's Application Personality
  10. - Interface Guide
  11.   Main View (Edit Objects/Methods)
  12.   Eval Controls
  13.   About Newt
  14.   ExprKbd
  15.   Eval Log
  16. - Preferences
  17.  
  18. =====
  19. Getting Started
  20.  
  21. Where to Find Newt, Slurpee, NewtATut, NewtTurT,...
  22. -----
  23. Presumably, you have already obtained Newt or you would not be reading this.
  24. A compressed file usually named newt-devenv-vv.sit or .hqx (vv = version
  25. number, e.g., 3.1 = 31) should contain Newt-vv.pkg and .txt files. See
  26. Newt.1st or newt-faq.txt for servers/sites.
  27.  
  28. - Install Newt using Connection Kit (or other package downloader).
  29.  
  30. - [NEW in 3.0] You can install library plug-ins that contain source text for a
  31.   project, and then copy this text to your current folder. see Select Library
  32.   and Copy Source. For example, applic0.lib and/or applic2.lib (these are
  33.   packages) contain the text for applic0.nwt and aplic2.nwt.
  34.  
  35. - Download examples. Earlier versions of Newt had some built-in demos. To
  36.   save space and distribute more examples and source, I provide these
  37.   separately in applic0.nwt, applic2.nwt, graphic0.nwt.  You can, of course,
  38.   enter the source yourself via handwriting and tapping Newton's "keyboard"
  39.   (see Edit Methods).  However, to save time and minimize syntactic errors, I
  40.   would recommend transferring the text from the .nwt source files. You can
  41.   copy/paste text between ----- into the Notepad of Connection Kit and then
  42.   Synchronize.  Or, you can use a terminal emulator program on your desktop
  43.   computer with either Slurpee or Figgle's Typomatica to transfer chunks of
  44.   text to separate Notepad entries. You can put everything in Unfiled or
  45.   existing or new folders and mix with other notes, though I would recommend
  46.   putting source entries for separate apps/files into separate folders.
  47.  
  48. - If you take the the time to install Slurpee 1.6 and configure your
  49.   desktop terminal emulator, not only can you transfer source text into the
  50.   Newton (and later, resource files for bitmaps and sounds), but also you can
  51.   use Slurpee as an "Inspector": you can type in a text field on the Newton.
  52.   When you evaluate expressions, values and errors can be redirected to your
  53.   desktop system, which can be quite handy for debugging.
  54.  
  55. - Start Newt from Extras (or from NewtATut or NewtTurT or Slurpee)
  56.  
  57. - Tap overview and select About Newt. You can tap Save (located in the bottom
  58.   Eval Controls) to save a registration form to your Notepad. close About Newt.
  59.  
  60.  
  61. Exploring Newt's Application Personality
  62. -----
  63. Try the following (see also the NewtATut interactive tutorial). You should
  64. have NewtPack installed (see packages.txt) if you want to be able to Save
  65. your application.
  66. - select the folder at top of screen containing your sources.
  67. - tap the Expr button (in Eval Controls)
  68. - select the expression :doObj('add,'MyApp)
  69. - tap Eval
  70. - select MyApp from the popup -- a application view with title appears
  71. - tap Eval, select MyApp.myInputProto -- a user prototype object is defined in
  72.   the running application (to be used by num1 and num2 fields)
  73. - tap Eval, select MyApp+button -- this dynamically adds a button to MyApp.
  74.   you can tap on the button; if the About box (float) has not yet been created,
  75.   you will hear a sound
  76. - MyApp+float -- this adds a floating view dynamically
  77. - MyApp.float+aboutText -- adds a basic text object. close the floating view.
  78.   now tap the About button
  79. - MyApp+num1 -- this adds an input field that expects numbers.  You can write a
  80.   number in the field, or double-tap for a calculator keypad.  When the total
  81.   object exists, it will be updated.
  82. - MyApp+num2 -- adds a second input field
  83. - MyApp+round -- this adds a checkbox that makes total an integer or real
  84. - MyApp+total --  this displays the total of num1 and num2
  85.  
  86. Hopefully, you have followed these steps correctly/successfully, and have a
  87. functioning application. If you have NewtPack installed and your
  88. application is visible,
  89. - tap the Save button
  90.   (the button should stay highlighted, and a progress box should appear)
  91. - tap Extras, and tap its icon
  92.  
  93. If you have the sources for an application in the current folder (transferred
  94. via Slurpee, or copied from NewtATut), you can rebuild the application later
  95. from these sources by Evaluating the expression:
  96.   :doObj('build, 'myApp)
  97.  
  98. (The 2nd arg is the app symbol -- first line of application object definition).
  99.  
  100.  
  101.  
  102. Exploring Newt's Turtle Personality
  103. -----
  104. [this has been moved to turtle.txt]
  105.  
  106.  
  107. =====
  108. Interface Guide
  109.  
  110. The following sections cover the major interface areas of Newt -- the views
  111. available by tapping overview (the dot between the two fixed scroll arrows at
  112. the bottom of the screen).
  113.  
  114. Main View (Edit Objects/Methods)
  115. -----
  116. This is the initial screen where you browse and edit objects and methods. Other
  117. views (windows) are used for drawing, printing, building applications, and as
  118. control palettes.
  119.  
  120. overview
  121. Tap the overview dot (between the fixed scroll arrows at center bottom) to pop
  122. up a list of current views, containing built-in views such as About Newt, and
  123. Eval Log, palettes such as Eval Controls, packages such as Slurpee (if
  124. installed), and any user-created applications, e.g., Hello World. You can
  125. also add NTK apps/books to this list. If you have installed plug-ins such as
  126. NewtDraw or ExprKbd, other entries may appear.
  127.  
  128. scroll arrows
  129. In Edit Methods (Main View) or Eval Log (if visible), the main text field
  130. scrolls.
  131.  
  132. folder tab (top of screen)
  133. Newt uses the folder label for organizing "newts" for Save in Edit Methods
  134. (Main View), Eval Log, and About Newt (and Newt Drawing, if installed).  Newt
  135. "compiles" (i.e., makes an executable version of) methods and checks objects
  136. found in the current folder, and notes errors (if any) in Eval Log.
  137.  
  138. source name
  139. The name of current object, method or page appears in a "picker list", preceded
  140. by a diamond. (Status messages may appear here also).
  141.  
  142. action button (envelope icon)
  143. You can Save and Revert, Duplicate, Delete current source.  You can also copy
  144. templates from a library folder -- see later action button descriptions. Newt
  145. does not currently provide a filing button -- however, you can look at,
  146. reorganize, print, fax, beam etc. your saved newts (source, screen
  147. snapshots, print results, registration form) outside Newt in the generic
  148. Notepad application.
  149.  
  150. We will now cover the other palettes and views, and return to editing and
  151. creating methods later under Edit Methods (continued).
  152.  
  153.  
  154. Eval Controls
  155. -----
  156. The following controls are found in a floating, draggable palette, located
  157. initially at the bottom of Newt's screen: Eval field, Expr, keyboard icon,
  158. Eval button, Print?, and Save. As a general rule, you will want to keep Eval
  159. Controls visible, rather than closing and re-opening it.
  160.  
  161. Eval field
  162. This field can contain a short program in NewtonScript. Tap the Eval button to
  163. execute it. Techniques for entering expressions include combinations of
  164. - handwriting -- not great, given the amount of punctuation needed
  165. - copy & drag text selections to/from the margin "clipboard"
  166. - tap the keyboard icon for a floating kbd without "do you want to add" prompts
  167. - double-tap for the default alphanumeric keyboard and use extra spaces
  168.   around some NewtonScript punctuation to reduce spurious prompts
  169. - keyboards, e.g., KbdPro, or "reverse terminal emulators", e.g., Typomatica
  170.   (Figgles Utils) or Slurpee
  171. - tap Times in Newt Controls (if NewtDrawing installed) to fill in a standard
  172.   "for" expression 
  173. - select complete expressions from the customizable Expr list
  174. - use the variable names times, dist and deg, so you can change numbers in
  175.   the Times, Dist and Deg fields in Newt Controls (if NewtDrawing installed)
  176.   rather than in the middle of the Eval field.
  177. - select partial expressions from the ExprKbd plug-in palette [if installed]
  178. - tap code items in Newt books like NewtATut, NewtTurT, NewtPFB
  179.  
  180. Expr
  181. A popup list of sample expressions appears -- you can customize this. If you
  182. select an expression, it appears in the Eval field. You can then edit it,
  183. and/or tap the Eval button to execute.
  184.  
  185. keyboard icon
  186. This toggles (either shows or hides) a floating alphanumeric keyboard that does
  187. not prompt for additions to the dictionary. You can double-tap in the Eval
  188. field for the standard keyboard.
  189.  
  190. Eval button
  191. Tap the Eval button to evaluate (compile and execute) the expression in Eval
  192. field. The button remains highlighted during execution. (During interruptible
  193. methods, e.g., squiral2, it changes to Stop and you can tap it to terminate
  194. execution.) If you spell something incorrectly, or use incorrect parameters or
  195. syntax, Eval Log (or a system error box) will appear with a somewhat cryptic
  196. error message or code (see Errors). You can add additional error messges
  197. via the ErrCnst plug-in.  Basically, you will have to compare what
  198. you wrote more carefully against the example, edit it and try again. (Other
  199. info and examples available to registered users).
  200.  
  201. WARNING: NEITHER NEWTON NOR NEWT PROVIDE A GENERAL INTERRUPT CAPABILITY. SO,
  202. UNLESS YOU LIKE USING THE MANUAL RESET BUTTON IN THE BACK, USE COMMON SENSE IN
  203. CHOOSING VALUES FOR ITERATION, RECURSION OR DISTANCE THAT ARE NOT "TOO LARGE".
  204. I will generally provide some reasonable values to try. Newt's default
  205. behavior is to finish executing the entire expression before checking for user
  206. actions like button taps. There is a facility provided in Newt to replace the
  207. NewtonScript "for" iteration construct. This facility executes each step in
  208. the background, allows you to interrupt Newt, and is covered in the manual.
  209.  
  210. Print?
  211. If checked (default: no), the Eval Log view pops up with expression and results
  212. after you tap the Eval button. Error messages will appear regardless of this
  213. setting.  If you have Slurpee connected as an Inspector, print and error results
  214. appear in your desktop terminal emulator.
  215.  
  216. Heap
  217. The first time you tap this, the Newton begins to display the amount of
  218. heap remaining & updates every ~10 seconds. If you tap again, it immediately
  219. does a "gc" (garbage collect) which should increase the number.  To turn off,
  220. close Eval Controls, then re-open it from the overview menu.
  221.  
  222. Save
  223. The current (top) view is saved, usually to the Notepad under the current
  224. folder tab category. For Edit Methods, the method source, if edited, is saved
  225. (same as Save under action button) if there are no errors. For About Newt, a
  226. text registration form is saved. For Eval Log, the current printed results
  227. are saved. For Newt Drawing, the current drawing, if any, is saved. A user
  228. application is saved either as a package if NewtPack is installed). If the
  229. view is not recognized as an "application", Newt beeps.
  230.  
  231.  
  232. Newt Drawing, Newt Controls
  233. [see turtle.txt]
  234.  
  235.  
  236. About Newt
  237. -----
  238. Select this via overview. Tap Save in Eval Controls to create a registration
  239. form in Notepad under the current category (see folder tab) for later
  240. printing, mailing, etc.  Or, tap the $ button in order to register and pay
  241. electronically if you have the Register application -- see register.txt
  242.  
  243.  
  244. ExprKbd
  245. -----
  246. [if ExprKbd plug-in is installed]
  247. This is a separate floating, draggable palette accessible via overview,
  248. located initially on the right hand side of the screen. This can be used for
  249. Eval field, but is most useful for source in Edit Methods (Main View).
  250. As you select items from the text list, an expression is inserted into your
  251. current source along with syntax for a function, method or slot. Customizing
  252. this list is described in the manual (or you can change the plug-in tool
  253. itself by modifying the exprkbdt.nwt example).
  254.  
  255.  
  256. Eval Log
  257. -----
  258. See earlier comments under folder tab, scroll arrows, Print? and Save.
  259.  
  260.  
  261. Slurpee, NewtATut, NewtTurT, etc.
  262. -----
  263. If Slurpee is installed, it will also appear in the overview list.  If you
  264. have started Newt from NewtATut or NewtTurt, titles for these books will
  265. appear here also. You can also add other NTK packages (apps and books) for
  266. convenience.
  267.  
  268. Your Applications
  269. overview also contains the titles of applications you are currently developing
  270. within Newt, based on source methods. Once you Save the application as a package,
  271. it is available separately in Extras.
  272.  
  273.  
  274. Edit Objects/Methods (continued)
  275. -----
  276. We now complete coverage of the interface by revisiting the main view.
  277.  
  278. source names
  279. A "picker" at the top preceded by a diamond contains methods, objects and
  280. pages defined in current folder (see folder tab). The diamond disappears
  281. during editing (see Save, Revert).  Status messages for lengthy operations
  282. (Checking,Deleting, Copying) sometimes appear here. You can also select one
  283. of the "new" names at the top of the menu to create a default template.
  284.  
  285. source text
  286. As in the Eval field, you can use handwriting, copy&drag and keyboards to edit
  287. your method, object or page source. You can change its name by editing. You
  288. can Save, Revert, Duplicate or Delete it via the action button on right.
  289. Conventions for different kinds of methods and objects and NewtonScript syntax
  290. described in the manual.  Also look at graphic0.nwt and applic0.nwt for
  291. examples.
  292.  
  293. action button
  294. Note: "..." after a command indicates that a popup menu or confirm dialog will
  295. follow.  If command beeps, then it's probably illegal in current context --
  296. you may need to do a Revert, or Select Library first.
  297.  
  298. - Save
  299. Assuming that the source name is valid, does not conflict with a pre-defined
  300. "system" method, and successfully compiles, the method source is saved
  301. (created or updated) as a "newt" (i.e., text Note) in the current folder.
  302. Errors, if any, are noted in Eval Log, with the line of source indicated by
  303. the error message.  Newt saves only valid sources. So, if you cannot figure
  304. out a compile error from the cryptic message, you could either Revert to
  305. the earlier version, or comment out offending code (precede individual
  306. lines with //, or wrap a section with /* <lines of code> */), so that you
  307. can Save for now, get on with your life, and look at it later. Methods are
  308. defined immediately; other objects are only checked but can be added
  309. explicitly later, e.g., via :doObj.
  310.  
  311. - Revert
  312. If you have unsaved changes, the diamond in front of the source name disappears.
  313. Revert returns to the last version saved of the original method in the current
  314. folder, or to the basic template. 
  315.  
  316. ---
  317.  
  318. - Add(Obj)
  319. If you have a source for an object in the editor, this adds the object to your
  320. application. If the first line is "myApp+aButton", this is equivalent to
  321. :doObj('add, "myApp+aButton"). (This assumes you've added "myApp" earlier.)
  322.  
  323. - Build(App)
  324. If you have a source for any object from an application visible in the editor,
  325. this does a build of your application (adds application and all of its child
  326. objects). If the first line is "myApp+aButton", this is equivalent to
  327. :doObj('build, 'myApp) -- it adds "myApp", then "myApp+aButton", etc.
  328.  
  329. ---
  330.  
  331. - Duplicate
  332. This makes a copy of the current source. Give it a new name (no duplicate names
  333. allowed) before Saving.
  334.  
  335. - Delete
  336. Deletes current source from Notepad. It also deletes defined Newt method (if any)
  337. but does not delete objects from an application. No confirmation.
  338.  
  339. - Delete All...
  340. Deletes all current items from the current Notepad folder. It confirms first.
  341.  
  342. ---
  343.  
  344. - Select Library...
  345. Pops up a list of available library plug-ins, e.g., applic2.lib. (Note: you
  346. can create these library packages directly from Newt itself).
  347.  
  348. - Copy Source... (formerly "Copy from")
  349. Pops up a list of available sources in current plug-in. Copies source for
  350. selection to the editor; to save to Notepad, make an editing change, possibly
  351. changing the name, then Save. This could be useful for libraries of templates.
  352.  
  353. - Copy All...
  354. Copies all sources from current library to current folder. It confirms first.
  355. You may wish to do Delete All first.
  356.  
  357. ---
  358.  
  359. Remove Package...
  360. Pops up an alphabetical scrolling list of currently installed packages.
  361. This can be convenient for getting rid of packages that you no longer need
  362. (note: if you delete any of Newt's plug-ins while in Newt, be prepared to
  363. quit immediately afterward; otherwise, you may encounter a memory error).
  364. If you attempt to save a package whose name (appSymbol) already exists,
  365. Newt will prompt you about removing it before proceeding (so, need to
  366. remove it first yourself).
  367.  
  368. Preferences
  369. -----
  370. Newt saves your preferences for Print? and folder tab and others (including
  371. Pen, Color, Newt? for NewtDraw) in a small "system soup" frame that persists
  372. across Newt sessions. If you no longer need Newt, you can remove this
  373. preferences frame via a soup utility (like StewPot) or directly from Newt
  374. (evaluate EntryRemoveFromSoup(prefsEntry) just prior to exiting Newt).
  375.  
  376. Also, if you have used RUNewt earlier, this is no longer needed in 3.1 -- so,
  377. you can remove the "RUNewt:TKnollSys" package. If you are careful, you can
  378. remove the "RUNewt:Apps:TKnollSys" soup, and the "RunNewtRun:TKnollSys"
  379. system preference with a soup utility.
  380.  
  381.